import { request } from '@/utils/request'

// 图形验证码
export function getVerificationApi(parmas) {
  return request({
    url: `auth/authorize/graphCode/${parmas.requestId}`,
    method: 'get',
    responseType: 'arraybuffer',
  })
}

// 登录
export function getLoginApi(data) {
  return request({
    method: 'POST',
    url: 'auth/authorize/login',
    data,
  })
}

// 获取用户信息
export function getInfoApi(params) {
  return request({
    url: 'auth/authorize/getUserInfo',
    method: 'get',
    params,
  })
}

// 退出登录
export function logoutApi(data) {
  return request({
    url: 'auth/authorize/logout',
    method: 'post',
    data,
  })
}
